/*
 * 
 *  jiangcheng
 *  
 */

package com.uhaou.web.model;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;
import org.apache.commons.lang.StringUtils;

import com.uhaou.common.base.*;
import com.uhaou.common.util.*;

import cn.org.rapid_framework.util.*;
import cn.org.rapid_framework.web.util.*;
import cn.org.rapid_framework.page.*;
import cn.org.rapid_framework.page.impl.*;

import com.uhaou.web.model.*;
import com.uhaou.web.dao.*;
import com.uhaou.web.service.*;
import com.uhaou.web.vo.query.*;

/**
 * @author  jiangcheng
 * @version 1.0
 * @since 1.0
 */


public class WebCard extends BaseEntity implements java.io.Serializable {
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "WebCard";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_CREATOR = "creator";
	public static final String ALIAS_TYPES = "types";
	public static final String ALIAS_PUB_STATE = "pubState";
	public static final String ALIAS_IS_OWNER = "isOwner";
	public static final String ALIAS_BG_BACK = "bgBack";
	public static final String ALIAS_LAST_NAME = "lastName";
	public static final String ALIAS_FIRST_NAME = "firstName";
	public static final String ALIAS_ENG_NAME = "engName";
	public static final String ALIAS_SEX = "sex";
	public static final String ALIAS_POSITION = "position";
	public static final String ALIAS_CMP_NAME = "cmpName";
	public static final String ALIAS_CMP_URL = "cmpUrl";
	public static final String ALIAS_MOBILE = "mobile";
	public static final String ALIAS_PHONE = "phone";
	public static final String ALIAS_BIRTH_YEAR = "birthYear";
	public static final String ALIAS_BIRTH_MONTH = "birthMonth";
	public static final String ALIAS_BIRTH_DAY = "birthDay";
	public static final String ALIAS_EMAIL = "email";
	public static final String ALIAS_BLOBS = "blobs";
	public static final String ALIAS_MSN = "msn";
	public static final String ALIAS_QQ = "qq";
	public static final String ALIAS_REMARK = "remark";
	public static final String ALIAS_STATE = "state";
	public static final String ALIAS_CREATE_TIME = "createTime";
	public static final String ALIAS_SORT = "sort";
	
	//date formats
	public static final String FORMAT_CREATE_TIME = DATE_FORMAT;
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	@Length(max=32)
	private java.lang.String id;
	@Length(max=32)
	private java.lang.String creator;
	@Length(max=32)
	private java.lang.String types;
	@Length(max=32)
	private java.lang.String pubState;
	@Length(max=32)
	private java.lang.String isOwner;
	@Length(max=200)
	private java.lang.String bgBack;
	@Length(max=200)
	private java.lang.String lastName;
	@Length(max=200)
	private java.lang.String firstName;
	@Length(max=200)
	private java.lang.String engName;
	@Length(max=2)
	private java.lang.String sex;
	@Length(max=100)
	private java.lang.String position;
	@Length(max=300)
	private java.lang.String cmpName;
	@Length(max=300)
	private java.lang.String cmpUrl;
	@Length(max=32)
	private java.lang.String mobile;
	@Length(max=32)
	private java.lang.String phone;
	@Length(max=4)
	private java.lang.String birthYear;
	@Length(max=4)
	private java.lang.String birthMonth;
	@Length(max=4)
	private java.lang.String birthDay;
	@Length(max=100)
	private java.lang.String email;
	@Length(max=200)
	private java.lang.String blobs;
	@Length(max=100)
	private java.lang.String msn;
	@Length(max=50)
	private java.lang.String qq;
	@Length(max=2000)
	private java.lang.String remark;
	@Length(max=32)
	private java.lang.String state;
	
	private java.util.Date createTime;
	
	private Long sort;
	//columns END

	public WebCard(){
	}

	public WebCard(
		java.lang.String id
	){
		this.id = id;
	}

	public void setId(java.lang.String value) {
		this.id = value;
	}
	
	public java.lang.String getId() {
		return this.id;
	}
	public void setCreator(java.lang.String value) {
		this.creator = value;
	}
	
	public java.lang.String getCreator() {
		return this.creator;
	}
	public void setTypes(java.lang.String value) {
		this.types = value;
	}
	
	public java.lang.String getTypes() {
		return this.types;
	}
	public void setPubState(java.lang.String value) {
		this.pubState = value;
	}
	
	public java.lang.String getPubState() {
		return this.pubState;
	}
	public void setIsOwner(java.lang.String value) {
		this.isOwner = value;
	}
	
	public java.lang.String getIsOwner() {
		return this.isOwner;
	}
	public void setBgBack(java.lang.String value) {
		this.bgBack = value;
	}
	
	public java.lang.String getBgBack() {
		return this.bgBack;
	}
	public void setLastName(java.lang.String value) {
		this.lastName = value;
	}
	
	public java.lang.String getLastName() {
		return this.lastName;
	}
	public void setFirstName(java.lang.String value) {
		this.firstName = value;
	}
	
	public java.lang.String getFirstName() {
		return this.firstName;
	}
	public void setEngName(java.lang.String value) {
		this.engName = value;
	}
	
	public java.lang.String getEngName() {
		return this.engName;
	}
	public void setSex(java.lang.String value) {
		this.sex = value;
	}
	
	public java.lang.String getSex() {
		return this.sex;
	}
	public void setPosition(java.lang.String value) {
		this.position = value;
	}
	
	public java.lang.String getPosition() {
		return this.position;
	}
	public void setCmpName(java.lang.String value) {
		this.cmpName = value;
	}
	
	public java.lang.String getCmpName() {
		return this.cmpName;
	}
	public void setCmpUrl(java.lang.String value) {
		this.cmpUrl = value;
	}
	
	public java.lang.String getCmpUrl() {
		return this.cmpUrl;
	}
	public void setMobile(java.lang.String value) {
		this.mobile = value;
	}
	
	public java.lang.String getMobile() {
		return this.mobile;
	}
	public void setPhone(java.lang.String value) {
		this.phone = value;
	}
	
	public java.lang.String getPhone() {
		return this.phone;
	}
	public void setBirthYear(java.lang.String value) {
		this.birthYear = value;
	}
	
	public java.lang.String getBirthYear() {
		return this.birthYear;
	}
	public void setBirthMonth(java.lang.String value) {
		this.birthMonth = value;
	}
	
	public java.lang.String getBirthMonth() {
		return this.birthMonth;
	}
	public void setBirthDay(java.lang.String value) {
		this.birthDay = value;
	}
	
	public java.lang.String getBirthDay() {
		return this.birthDay;
	}
	public void setEmail(java.lang.String value) {
		this.email = value;
	}
	
	public java.lang.String getEmail() {
		return this.email;
	}
	public void setBlobs(java.lang.String value) {
		this.blobs = value;
	}
	
	public java.lang.String getBlobs() {
		return this.blobs;
	}
	public void setMsn(java.lang.String value) {
		this.msn = value;
	}
	
	public java.lang.String getMsn() {
		return this.msn;
	}
	public void setQq(java.lang.String value) {
		this.qq = value;
	}
	
	public java.lang.String getQq() {
		return this.qq;
	}
	public void setRemark(java.lang.String value) {
		this.remark = value;
	}
	
	public java.lang.String getRemark() {
		return this.remark;
	}
	public void setState(java.lang.String value) {
		this.state = value;
	}
	
	public java.lang.String getState() {
		return this.state;
	}
	public String getCreateTimeString() {
		return DateConvertUtils.format(getCreateTime(), FORMAT_CREATE_TIME);
	}
	public void setCreateTimeString(String value) {
		setCreateTime(DateConvertUtils.parse(value, FORMAT_CREATE_TIME,java.util.Date.class));
	}
	
	public void setCreateTime(java.util.Date value) {
		this.createTime = value;
	}
	
	public java.util.Date getCreateTime() {
		return this.createTime;
	}
	public void setSort(Long value) {
		this.sort = value;
	}
	
	public Long getSort() {
		return this.sort;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("Creator",getCreator())
			.append("Types",getTypes())
			.append("PubState",getPubState())
			.append("IsOwner",getIsOwner())
			.append("BgBack",getBgBack())
			.append("LastName",getLastName())
			.append("FirstName",getFirstName())
			.append("EngName",getEngName())
			.append("Sex",getSex())
			.append("Position",getPosition())
			.append("CmpName",getCmpName())
			.append("CmpUrl",getCmpUrl())
			.append("Mobile",getMobile())
			.append("Phone",getPhone())
			.append("BirthYear",getBirthYear())
			.append("BirthMonth",getBirthMonth())
			.append("BirthDay",getBirthDay())
			.append("Email",getEmail())
			.append("Blobs",getBlobs())
			.append("Msn",getMsn())
			.append("Qq",getQq())
			.append("Remark",getRemark())
			.append("State",getState())
			.append("CreateTime",getCreateTime())
			.append("Sort",getSort())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof WebCard == false) return false;
		if(this == obj) return true;
		WebCard other = (WebCard)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

